unit URelatorioPlanoContas2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UFormRelatorio, DB, DBTables, StdCtrls, QRCtrls, QuickRpt,
  ExtCtrls;

type
  TFRelatorioPlanoContas2 = class(TFormRelatorio)
    QRBand2: TQRBand;
    QRLabel6: TQRLabel;
    QRDBText3: TQRDBText;
    QRLabel5: TQRLabel;
    QRLabel4: TQRLabel;
    QRDBText1: TQRDBText;
    QRLabel7: TQRLabel;
    QRDBText2: TQRDBText;
    QRDBText4: TQRDBText;
    procedure FormCreate(Sender: TObject);
    procedure QRLabel3Print(sender: TObject; var Value: String);
    procedure QRDBText4Print(sender: TObject; var Value: String);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRelatorioPlanoContas2: TFRelatorioPlanoContas2;

implementation

uses UGeral, UGestao, UEstruturaPlano;

{$R *.dfm}

procedure TFRelatorioPlanoContas2.FormCreate(Sender: TObject);
begin
  inherited;
  {
  QRelatorio.Close;
  QRelatorio.SQL.Clear;
  QRelatorio.SQL.Add('Select Emp_Razao as Razao from empresa ');
  QRelatorio.SQL.Add('Where Emp_Codigo = :Cod ');
  QRelatorio.ParamByName('Cod').AsInteger:=Codigoempresa;
  QRelatorio.Open;
  QRLNomeEmpresa.Caption := QRelatorio.fieldByname('Razao').AsString;
  }
  QRLNomeEmpresa.Caption := nomeEmpresa;
  
end;

procedure TFRelatorioPlanoContas2.QRLabel3Print(sender: TObject;
  var Value: String);
begin
  inherited;
value:='';
end;

procedure TFRelatorioPlanoContas2.QRDBText4Print(sender: TObject;
  var Value: String);
begin
  inherited;
  Value := QRDBText4.DataSet.FieldByName('ESTRUTURA').AsString + ' - ' +
           QRDBText4.DataSet.FieldByName('DESCRICAO').AsString;

end;

end.
